/*
\s 元字符用于查找空白字符。

空白字符可以是：

空格符 (space character)
制表符 (tab character)
回车符 (carriage return character)
换行符 (new line character)
垂直换行符 (vertical tab character)
换页符 (form feed character)

并且可以是多个
*/
const reg = /^\s\)$/
console.log(reg.test(` )`)); //true
console.log(reg.test(`
)`)); //true

console.log(reg.test(`


)`)); //false

const reg2 = /^.$/; //. ---> 匹配除换行符以外的任意字符
console.log(reg2.test(' ')); //true
console.log(reg2.test(`
`)); //false
